package com.zhangtai.modules.service.salary;

import com.zhangtai.modules.entity.salary.ComputerSubsidyEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * 电脑补贴
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-12-19 09:31:40
 */

public interface ComputerSubsidyService {

    @GetMapping("/findComputerSubsidyList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "oid", required = false) String oid,
                         @RequestParam(value = "equipment", required = false) List<Integer> equipment,
                         @RequestParam(value = "orgIds",required = false) List<Long> orgIds,
                         @RequestParam(value = "code", required = false) String code,
                         @RequestParam(value = "name", required = false) String name,
                         @RequestParam(value = "orgName", required = false) String orgName,
                         @RequestParam(value = "unitName", required = false) String unitName,
                         @RequestParam(value = "jobName", required = false) String jobName,
                         @RequestParam(value = "applyDateStart", required = false) String applyDateStart,
                         @RequestParam(value = "applyDateEnd", required = false) String applyDateEnd,
                         @RequestParam(value = "approveStatus", required = false) List<Integer> approveStatus,
                         @RequestParam(value = "type", required = false) List<Integer> type,
                         @RequestParam(value = "status", defaultValue = "1") Integer status,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);
    /**
     * 保存异地补贴接口
     * @param applyDate   申请时间 就是借调调动申请时间
     * @param oid   补贴人oid
     * @param beforeSubsidyEnd   原补贴结束时间
     * @param beforeSubsidyId   原补贴id
     * @param afterSubsidy     调整后补贴
     * @param afterSubsidyStart  调整后补贴开始时间
     * @param afterSubsidyEnd    调整后补贴结束时间
     * @param fileUrl    附件 借调调动附件
     * @param bpmUrl    bpm回调地址
     * @param reason    调动原因
     * @return
     */
    @ApiOperation(value = "保存异地补贴接口")
    public R saveComputerSubsidy(Date applyDate,
                                 Long oid,
                                 Date beforeSubsidyEnd,
                                 Long beforeSubsidyId,
                                 BigDecimal afterSubsidy,
                                 Date afterSubsidyStart,
                                 Date afterSubsidyEnd,
                                 String fileUrl,
                                 String bpmUrl,
                                 String reason);
    @GetMapping("/infoComputerSubsidy")
    @ApiOperation(value = "根据id查找")
    ComputerSubsidyEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveComputerSubsidy")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody ComputerSubsidyEntity entity);

    @PostMapping("/updateComputerSubsidy")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody ComputerSubsidyEntity entity);

    @GetMapping("/deleteOneComputerSubsidy")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteComputerSubsidys")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

